<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Scans the buffer for an occurrence of an end of line</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="eventbuffer.search.html">« EventBuffer::search</a></li>
      <li style="float: right;"><a href="eventbuffer.substr.html">EventBuffer::substr »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.eventbuffer.html">EventBuffer</a></li>
    <li>Scans the buffer for an occurrence of an end of line</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="eventbuffer.searcheol" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">EventBuffer::searchEol</h1>
  <p class="verinfo">(PECL event &gt;= 1.5.0)</p><p class="refpurpose"><span class="refname">EventBuffer::searchEol</span> &mdash; <span class="dc-title">Scans the buffer for an occurrence of an end of line</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-eventbuffer.searcheol-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="methodname"><strong>EventBuffer::searchEol</strong></span>(<span class="methodparam">
    <span class="type">int</span>
     <code class="parameter">$start</code>
    <span class="initializer"> = -1</span>
   </span>, <span class="methodparam">
    <span class="type">int</span>
     <code class="parameter">$eol_style</code>
    <span class="initializer"> = 
     <strong><code>EventBuffer::EOL_ANY</code></strong>
    </span>
   </span>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>

  <p class="para rdfs-comment">
   Scans the buffer for an occurrence of an end of line specified by
   <code class="parameter">eol_style</code>
   parameter . It returns numeric position of the string, or <strong><code>false</code></strong> if the
   string was not found.
  </p>
  <p class="para">
   If the
   <code class="parameter">start</code>
   argument is provided, it represents the position at which the search should
   begin; otherwise, the search is performed from the start of the string. If
   <code class="parameter">end</code>
   argument provided, the search is performed between start and end buffer
   positions.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-eventbuffer.searcheol-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt>

     <code class="parameter">start</code>
    </dt>

    <dd>

     <p class="para">
      Start search position.
     </p>
    </dd>

   
   
    <dt>

     <code class="parameter">eol_style</code>
    </dt>

    <dd>

     <p class="para">
      One of
      <a href="class.eventbuffer.html#eventbuffer.constants" class="link">EventBuffer:EOL_* constants</a>
      .
     </p>
    </dd>

   
  </dl>

 </div>

 <div class="refsect1 returnvalues" id="refsect1-eventbuffer.searcheol-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns numeric position of the first occurrence of end-of-line symbol in
   the buffer, or <strong><code>false</code></strong> if not found.
  </p>
  <div class="warning"><strong class="warning">警告</strong><p class="simpara">此函数可能返回布尔值
<strong><code>false</code></strong>，但也可能返回等同于 <strong><code>false</code></strong> 的非布尔值。请阅读 <a href="language.types.boolean.html" class="link">布尔类型</a>章节以获取更多信息。应使用
<a href="language.operators.comparison.html" class="link">===
运算符</a>来测试此函数的返回值。</p></div>
 </div>

 <div class="refsect1 seealso" id="refsect1-eventbuffer.searcheol-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li class="member">
    <span class="methodname"><a href="eventbuffer.search.html" class="methodname" rel="rdfs-seeAlso">EventBuffer::search()</a> - Scans the buffer for an occurrence of a string</span>
   </li>
  </ul>
 </div>

</div></div></div></body></html>